<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover" />
    <title>全员考评</title>
    <link rel="stylesheet" href="{{asset('/addons/jquery-weui-build/css/weui.min.css')}}">
    <link rel="stylesheet" href="{{asset('/addons/jquery-weui-build/css/jquery-weui.css')}}">
    <link rel="stylesheet" href="{{asset('/addons/bootstrap/css/bootstrap.min.css')}}">
    <link rel="stylesheet" href="{{asset('/css/system/iconfont.css')}}">
    @if($skinid == 3)
        <link rel="stylesheet" href="/css/system/common.css?v=2018121301">
        <link rel="stylesheet" href="/css/system/full-evaluation.css">
    @elseif($skinid == 1)
        <link rel="stylesheet" href="/css/theme-blue/system/common.css">
        <link rel="stylesheet" href="/css/theme-blue/system/full-evaluation.css">
    @elseif($skinid == 2)
        <link rel="stylesheet" href="/css/theme-pink/system/iconfont-pink.css">
        <link rel="stylesheet" href="/css/theme-pink/system/common.css">
        <link rel="stylesheet" href="/css/theme-pink/system/full-evaluation.css">
    @endif
    @include('sysadmin.head')
</head>
<body ontouchstart>
<div class="mian-container">
    <div class="whole-performance">
        @foreach($perf as $p)
            <div class="weui-cells">
                <div class="weui-cell">
                    <div class="weui-cell__hd">
                        @if($p->class_id == 1)
                            <img class="floor-img" src="/img/group-floora{{$skinid}}.png">
                        @elseif($p->class_id == 2)
                            <img class="floor-img" src="/img/group-floorb{{$skinid}}.png" style="margin-left: 0.35rem;margin-right:-0.35rem;">
                        @else
                            <img class="floor-img" src="/img/group-floorc{{$skinid}}.png" style="margin-left: 0.75rem;margin-right: -0.75rem">
                        @endif
                    </div>
                    <div class="weui-cell__bd">
                        <p class="whole-name">{{$p->group_name}}</p>
                    </div>
                </div>
                @foreach($p->users as $pu)
                    <a class="parent-div" href="{{url('/sysadmin/user/perf?uid='.$pu->id)}}">
                        <div class="f-left pull-left">{{$pu->qw_name}}</div>
                        <div class="progress progress-striped active">
                            <div class="progress-bar progress-bar-info" role="progressbar" data-num="{{getUserPerform($year_param,$pu->id)->total}}" aria-valuenow="{{getUserPerform($year_param,$pu->id)->total}}" aria-valuemin="0" aria-valuemax="150">
                            </div>
                        </div>
                        <div class="progress-hidden-info"></div>
                        <img class="test-img" src="/img/test.png">
                        <div class="f-right pull-left">{{mb_substr(getUserPerform($year_param,$pu->id)->total,0,5)}}</div>
                        <img class="flag-img" src="/img/flag.png">
                        <span class="num-six">60</span><span class="num-ten">100</span>
                    </a>
                @endforeach
            </div>
        @endforeach
        
    </div>
    @include('sysadmin.admin-caidan')
</div>
<script src="{{asset('/kaohe/js/jquery-2.1.4.min.js')}}"></script>
<script src="{{asset('/addons/jquery-weui-build/js/fastclick.js')}}"></script>
<script>
    $(function() {
        document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
        FastClick.attach(document.body);
    });
</script>
<script src="{{asset('/addons/jquery-weui-build/js/jquery-weui.min.js')}}"></script>
<script>
    $(document).ready(function () {
        $('.whole-name').click(function(){
            $(this).toggleClass('whole-up');
            $(this).parent().parent().siblings('.parent-div').toggleClass('block');
        })
        $('.parent-div').click(function(){
            $(this).find('.sec-name').toggleClass('sec-up');
            $(this).siblings('.childern-div').toggle();
        })
        $('.kaohe-item').click(function(){
            $('.show-hidden').toggle();
        })
        $('.set-btn').click(function () {
            $('.set-hidden').toggle();
        })
        $('.admin-item').click(function(){
            $('.front-show-hidden').toggle();
        });
        $('.parent-div').each(function () {
            $(this).find('.progress-bar').css('width', ($(this).find('.progress-bar').data('num')/150)*100+'%');
            if($(this).find('.progress-bar').data('num')<60){
                $(this).find('.progress-bar').css('background-color','#E86C64');
            }else if($(this).find('.progress-bar').data('num')>=60&&$(this).find('.progress-bar').data('num')<80){
                $(this).find('.progress-bar').css('background-color','#FFC876');
            }else if($(this).find('.progress-bar').data('num')>=80&&$(this).find('.progress-bar').data('num')<100){
                $(this).find('.progress-bar').css('background-color','#bfd980');
            }else if($(this).find('.progress-bar').data('num')>=100&&$(this).find('.progress-bar').data('num')<150){
                $(this).addClass('flag-mark');
                $(this).addClass('full-mark');
                var re=(2.6-0.026*($(this).find('.f-right').text()-100))+'rem';
                $(this).find('.progress-hidden-info').css('width',$(this).find('.progress-striped').width())
                $(this).find('.test-img').css('right',re)
            }else if($(this).find('.progress-bar').data('num')>=150){
                $(this).addClass('flag-mark');
                $(this).addClass('full-mark');
                $(this).find('.progress-bar').css('width', $(this).find('.progress-striped').width());
//                var re=(2.6-0.026*($(this).find('.f-right').text()-100))+'rem';
                $(this).find('.progress-hidden-info').css('width',$(this).find('.progress-striped').width());
                $(this).find('.test-img').css('right',1.1+'rem');
            }
        });
    })
</script>
</body>
</html>